import request from './request'

export function login(data) {
  return request({
    url: '/api/Auth/login',
    method: 'post',
    data
  })
}

export function register(data) {
  return request({
    url: '/api/Auth/register',
    method: 'post',
    data
  })
}

export function logout() {
  return request({
    url: '/api/Auth/logout',
    method: 'post'
  })
}

export function changePassword(userId, data) {
  return request({
    url: `/api/User/${userId}/change-password`,
    method: 'post',
    data
  })
}

// 其它auth相关API同理...
